<%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2020/4/23
  Time: 23:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
</head>
<body>
    <button style="width: 100px;height: 100px;" id="btnTest"></button>
    <script>
        $(function () {
            $("#btnTest").click(function () {
                var page = "http://localhost:8080/msims/insertSampleStorage";
                $.ajax({
                    contentType:'application/json',
                    url: page,
                    data: JSON.stringify
                    ({"insertSample1": {"collecId":4,"countryCode":20400006,"userIdOperator":5
                                ,"holeLocCode":"Y1-A-1-A1-05","storageQuantity":500}
                        ,"insertSample2":{"collecId":4,"countryCode":20400007,"userIdOperator":5
                            ,"holeLocCode":"Y1-A-1-A1-06","storageQuantity":500}}),
                    dataType:'json',
                    type:'post',
                    success: function (result) {
                        console.log(result);
                    }
                })
            })
        })
    </script>
</body>
</html>
